package Server.ServerCore.Service.usyns;

import Server.ServerCore.Model.AI.BankerAI;
import Server.ServerCore.Model.Player.GameCharacter;
import javolution.util.FastList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author :石头哥哥<br/>
 *         Project:21Server
 *         Date: 13-4-2
 *         Time: 下午9:18
 */
public class SingelTable {

    private static final Logger LOG = LoggerFactory.getLogger(SingelTable.class);
    private int TableID;//牌桌编号

    private BankerAI banker;//庄,初始化table就存在庄家

    private FastList<CircleUnit> circleUnitFastList=new FastList<CircleUnit>(6);//每个牌桌上的CircleUnit对象列表，玩家位置，从右向左0，1，2，3，4,
    private  FastList<GameCharacter> gameCharacterFastList = new FastList<GameCharacter>(6); //游戏对象


    public SingelTable(int tableID){
        this.setTableID(tableID);
        for (int i=0;i!=6;++i){//0,1,2,3,4,5,注意5是bankerAI
            circleUnitFastList.add(new CircleUnit(i));
        }
    }



    public FastList<CircleUnit> getCircleUnitFastList() {
        return circleUnitFastList;
    }

    public void setCircleUnitFastList(FastList<CircleUnit> circleUnitFastList) {
        this.circleUnitFastList = circleUnitFastList;
    }

    public FastList<GameCharacter> getGameCharacterFastList() {
        return gameCharacterFastList;
    }

    public void setGameCharacterFastList(FastList<GameCharacter> gameCharacterFastList) {
        this.gameCharacterFastList = gameCharacterFastList;
    }

    public BankerAI getBanker() {
        return banker;
    }

    public void setBanker(BankerAI banker) {
        this.banker = banker;
    }

    public int getTableID() {
        return TableID;
    }

    public void setTableID(int tableID) {
        TableID = tableID;
    }

public class CircleUnit{
        private int circleUnitID;  //编号
        private boolean Occupancy;//占用状态
        public CircleUnit(int circleUnit){
            this.circleUnitID=circleUnit;
            this.setOccupancy(false);//没有被占用
        }

        public boolean isOccupancy() {
            return Occupancy;
        }

        public void setOccupancy(boolean occupancy) {
            Occupancy = occupancy;
        }
        public int getCircleUnitID() {
            return circleUnitID;
        }

        public void setCircleUnitID(int circleUnitID) {
            this.circleUnitID = circleUnitID;
        }

    }
}
